<template>
<div class="register">
    <el-row>
        <el-col :span="8" :offset="8">
            <div class="grid-content bg-purple-light">
                <el-result icon="success" title="您的注册申请已提交" subTitle="经上级人员审核后，将会以短信的方式通知您。">
                    <template slot="extra">
                        <el-button type="default" v-if="false" @click="CloseWebPage">关闭页面</el-button>
                        <el-button type="primary" @click="login">返回登录</el-button>
                    </template>
                </el-result>
            </div>
        </el-col>
    </el-row>
</div>
</template>

<script>
export default {
    created(){

    },
    methods: {
        CloseWebPage() {
            if (navigator.userAgent.indexOf("Firefox") != -1 || navigator.userAgent.indexOf("Chrome") != -1) {
                window.location.href = "about:blank";
                window.close();
            } else {
                window.opener = null;
                window.open("", "_self");
                window.close();
            }
        },
        login() {
            let outLogin = null
            if (localStorage.getItem('outLogin')) {
                outLogin = JSON.parse(localStorage.getItem('outLogin'))
            } else {
                outLogin = {
                    name: "Login"
                }
            }
            this.$router.push(outLogin)
        }
    }
}
</script>

<style lang="scss">
.el-row {
    margin-bottom: 20px;

    &:last-child {
        margin-bottom: 0;
    }
}

.el-col {
    border-radius: 4px;
}

.bg-purple-dark {
    background: #99a9bf;
}

.bg-purple {
    background: #d3dce6;
}

.bg-purple-light {
    padding-top: 15vh;
    text-align: center;
}

.grid-content {
    border-radius: 4px;
    min-height: 36px;
}

.row-bg {
    padding: 10px 0;
    background-color: #f9fafc;
}
</style><style lang="scss">
.register {
    background-image: url(./background.png);
    background-size: cover;
    background-position: center top;
    position: relative;
    overflow: hidden;
    height: 100vh;
    width: 100%;
}
</style>
